package com.hbsx.why.ui.home;

import android.content.Context;
import android.content.Intent;
import android.view.View;

import com.hbsx.why.R;
import com.hbsx.why.utils.LogUtils;
import com.hbsx.why.utils.ToastUtils;

/**
 * Created by User on 2017/8/28.
 */

public class MeunAdd {
    private Context context;
    public MeunAdd(Context context) {
        this.context = context;
    }

    public void initView(View view, final String id) {
        view.findViewById(R.id.per_pager1_sh).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                context.startActivity(new Intent(context, ShengHuoActivity.class).putExtra("title","生活"));
            }
        });
        view.findViewById(R.id.per_pager1_ly).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                context.startActivity(new Intent(context, TravelActivity.class).putExtra("title","旅游"));
            }
        });
        view.findViewById(R.id.per_pager1_wy).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                context.startActivity(new Intent(context, WenYiActivity.class).putExtra("title","文遗"));
            }
        });
        view.findViewById(R.id.per_pager1_shuh).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                context.startActivity(new Intent(context, ShuHuaActivity.class).putExtra("title","书画"));
            }
        });
        view.findViewById(R.id.per_pager1_tc).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                context.startActivity(new Intent(context, TaoCiActivity.class).putExtra("title","陶瓷"));
            }
        });
    }
}
